<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>

<html>
<head>
	
	<%@ include file="/WEB-INF/views/include/common.jsp" %>	
	<title>Home</title>

<script type="text/javascript">

var _this = this;


$(document).ready(function() {
	logs('ready');
	_this.table1 = tableSync('table1');
	
	init();
});

function init(){
	logs('init');
	$('#bt_jsonTest').unbind('click');
	$('#bt_jsonTest').bind('click', jsonTest);	
}

function jsonTest(){
	logs('jsonTest');
	try{
		var url="getUserList.json";
		
		AjaxPost(url, function(data){
			logs('succed');
			logs(JSON.stringify(data));
			_this.table1.tableAutoSync(data.table1);
		});
	}catch(e){
		logs(e);
		
	}
}


</script>
</head>
<body>
<h1>
	Hello world!  
</h1>

<P>  The time on the server is ${serverTime}.${user.LoginID}</P>
<input id="bt_jsonTest" type="button" value="test json table"/>
<input id="bt_jsonTest" type="button" value="map line" onclick="getMapLine()"/>
<input id="bt_jsonTest" type="button" value="Car Infos" onclick="getCarInfos()"/>
<table id="table1">
	<tbody>
		<tr>
			<td id="userId">dd</td>
			<td id="userName">ff</td>
		</tr>
	</tbody>
</table>
<%@ include file="/WEB-INF/views/daumMap/daumMap.jsp" %>	
</body>
</html>
